<!--
* @description 
* @fileName Day.vue
* @author YDKD
* @date 2020/09/10 16:30:04
!-->
<template>
  <div class="container">
    <day-card :data="dayData"></day-card>
  </div>
</template>

<script>
import getDay from "../services/index";
import { onMounted, computed, watch } from "vue";

import { useStore } from "vuex";

import DayCard from "@/components/DayPage/Card";

import { getNowDate } from "@/libs/utils";

export default {
  name: "DayPage",
  components: {
    DayCard,
  },
  setup() {
    const store = useStore(),
      state = store.state;

    onMounted(() => {
      getDay(store, "day", getNowDate("day"));
    });

    return {
      dayData: computed(() => state.dayData),
    };
  },
};
</script>

<style lang="scss" scoped></style>
